/*
 * @Author: wangding
 * @Date: 2020-08-27 12:01:27
 * @LastEditTime: 2020-12-29 17:18:17
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \SolaxCloud\src\api\content.js
 * 接口地址-以及使用方法
 */
import { Object } from 'core-js'
import * as API from './'
import wd from './wdContent'
let obj = { lang: localStorage.getItem('lang') || 'en_US' }
let baiduMapKey = 'inh0qPVz4a09PXGUYpe0SgCr2GDUiEEh'
let googleMapKey = 'AIzaSyAjUe8uhN3nlkIc1cC50hCmTo_wab6r63g'
export default {
    ...wd,
    //登录
    loginIn: (params) => {
        return API.POST2('/login/loginNew', params)
    },
    //忘记密码
    forgotPwd: (params) => {
        return API.POST2('/login/forgotPWD', Object.assign({}, params, obj));
    },
    //获取菜单列表
    getMenuList: (params) => {
        return API.POST2('/login/showMenuList', params)
    },
    //获取用户信息
    getUserPage: (params) => {
        return API.POST2('/user/getPage', params)
    },
    //批量查询字典
    getDictionaryBatch: (params) => {
        return API.POST2('/dictionary/getDictionaryBatch', Object.assign({}, params, obj))
    },
    //批量删除用户信息
    delUserBatch: (params) => {
        return API.POST2('/login/delUserBatch', params)
    },
    //获取国家列表
    selectCountry: (params) => {
        return API.POST2('/area/selectCountry', params)
    },
    //获取用户信息
    getSessionUser: (params) => {
        return API.POST2('/login/getSessionUser', params)
    },
    //获取用户类型列表
    selectUserType: (params) => {
        return API.POST2('/user/selectUserType', Object.assign({}, params, obj))
    },
    //获取角色类型列表
    getRoleList: (params) => {
        return API.POST2('/user/getRoleList', Object.assign({}, params, obj))
    },
    //获取单位类型列表
    selectBusiness: (params) => {
        return API.POST2('/user/selectBusiness', params)
    },
    addEntity: (params) => {
        return API.POST2('/user/addEntity', params)
    },
    userGetById: (params) => {
        return API.POST2('/user/getById', params)
    },
    editEntity: (params) => {
        return API.POST3('/user/editEntity', params)
    },
    //国内省份
    selectNextAreaByName: (params) => {
        return API.POST2('/area/selectNextAreaByName', params)
    },


    //overview_agent--月年总发电量
    getTimeYield: (params) => {
        return API.POST2('/userIndex/getTimeYield', params)
    },
    //overview_agent--信息统计
    getCountParam: (params) => {
        return API.POST2('/userIndex/getCountParam', params)
    },
    //overview_agent--发电量统计图
    getYield: (params) => {
        return API.POST2('/userIndex/getYield', params)
    },
    //overview_agent--销售量分析
    saleStatisticsByTime: (params) => {
        return API.POST2('/saleStatistics/saleStatisticsByTime', params)
    },
    //index--告警信息
    getAlarmMsg: (params) => {
        return API.POST2('/login/showMsgList', params)
    },
    //index--告警条数
    getAlarmCount: (params) => {
        return API.POST2('/login/showMsgCount', params)
    },
    //index--告警信息-删除
    delAlarmMsg: (params) => {
        return API.POST2('/login/delMsg', params)
    },
    //index--告警信息-全部删除
    delAllAlarmMsg: (params) => {
        return API.POST2('/login/delAllMsg', params)
    },
    //修改密码
    updatePwd: (params) => {
        return API.POST2('/user/updatePwd', params)
    },
    //注销账户
    closeAccount: (params) => {
        return API.POST2('/user/deleteEntity', params)
    },
    //发送邮箱验证码
    sendMailCode: (params) => {
        return API.POST2('/login/sendMailCode', params)
    },
    //校验邮箱验证码
    regMailCode: (params) => {
        return API.POST2('/login/regMailCode', params)
    },
    //修改登录账号
    updateLoginName: (params) => {
        return API.POST2('/login/updateSendMail', params)
    },
    //overview--获取统计信息
    getUserInfoCount: (params) => {
        return API.POST2('/userIndex/getCount', params)
    },
    //overview--获取太阳动画数据
    getSunByUser: (params) => {
        return API.POST2('/weather/getPdtSiteByUserOrWifiSN', Object.assign({}, params, obj))
    },
    //overview--获取逆变器功率
    getPowerByUser: (params) => {
        return API.POST2('/userIndex/getPower', params)
    },
    //overview--获取逆变器发电量
    getYeildyByUser: (params) => {
        return API.POST2('/userIndex/getCurrentData', params)
    },
    //overview--获取功率曲线数据
    getSitePowerByUser: (params) => {
        return API.POST2('/site/getSiteTotalPower', params)
    },
    //overview--获取电量统计饼图数据
    getAggYieldByUser: (params) => {
        return API.POST2('/inverterIndex/getAggYield', params)
    },


    //overview-site  --获取统计信息
    getSiteInfoCount: (params) => {
        return API.POST2('/siteIndex/getInverterCount', params)
    },
    //overview-site  --获取太阳动画数据
    getSunBySite: (params) => {
        return API.POST2('/weather/getPdtSiteById', Object.assign({}, params, obj))
    },
    //overview-site  --获取逆变器功率
    getPowerBySite: (params) => {
        return API.POST2('/siteIndex/getPower', params)
    },
    //overview-site  --获取逆变器当前发电量
    getYeildyBySite: (params) => {
        return API.POST2('/siteIndex/getCurrentData', params)
    },
    //overview-site  --获取功率曲线数据
    getSitePowerBySite: (params) => {
        return API.POST2('/site/getSiteTotalPower', params)
    },
    //overview-site  --获取发电量统计图
    getYeildyChartBySite: (params) => {
        return API.POST2('/siteIndex/getYield', params)
    },
    //overview-site  --获取电量统计饼图数据
    getAggYieldBySite: (params) => {
        return API.POST2('/inverterIndex/getAggYield', params)
    },
    //overview-site  --节约电费
    saveElectricity: (params) => {
        return API.POST2('/site/electricyPriceIncome', params)
    },


    //overview-inverter  --获取组件信息
    getpvBattery: (params) => {
        return API.POST2('/inverterIndex/getPvBattery', Object.assign({}, params, obj))
    },
    //overview-inverter  --获取太阳动画数据
    getSunByInverter: (params) => {
        return API.POST2('/weather/getPdtSiteByUserOrWifiSN', Object.assign({}, params, obj))
    },
    //overview-inverter  --获取功率曲线数据
    getPowerByInverter: (params) => {
        return API.POST2('/inverterIndex/getInverterState', params)
    },
    //overview-inverter  --获取逆变器发电量
    getYeildyByInverter: (params) => {
        return API.POST2('/inverterIndex/getCurrentData', params)
    },
    //overview-inverter  --获取发电量统计图
    getYeildyChartByInverter: (params) => {
        return API.POST2('/inverterIndex/getYield', params)
    },
    //overview-inverter  --获取电量统计饼图数据
    getAggYieldBySite: (params) => {
        return API.POST2('/inverterIndex/getAggYield', params)
    },


    //agent--获取表格数据
    getAgentTable: (params) => {
        return API.POST2('/firm/getAgentPage', params)
    },
    //agent--批量删除
    agentDeleteBatch: (params) => {
        return API.POST2('/firm/deleteBatch', params)
    },
    //agent--判断firmName是否唯一
    agentFirmisUnique: (params) => {
        return API.POST2('/firm/isUnique', params)
    },
    //agent--判断loginName是否唯一
    agentUserisUnique: (params) => {
        return API.POST2('/user/getEntity', params)
    },
    //agent--新增
    agentAdd: (params) => {
        return API.POST2('/firm/addEntity', params)
    },
    //user_management--编辑获取数据
    getAgentDataById: (params) => {
        return API.POST2('/firm/getById', params)
    },
    //agent--编辑
    agentEdit: (params) => {
        return API.POST2('/firm/editEntity', params)
    },
    //agent--获取用户信息
    getAllUserByAgent: (params) => {
        return API.POST2('/user/getAllUserByAgent', params)
    },
    //user_management--获取表格数据
    getUserManagePage: (params) => {
        return API.POST2('/user/getUserManagePage', params)
    },
    //user_management--新增检验
    checkUserManageSN: (params) => {
        return API.POST2('/login/onlyUser', params)
    },
    //user_management--新增
    userManageAdd: (params) => {
        return API.POST2('/login/saveUser', params)
    },
    //user_management--编辑获取数据
    getUserManageData: (params) => {
        return API.POST2('/user/getById', params)
    },
    //user_management--编辑
    userManageEdit: (params) => {
        return API.POST2('/user/editEntity', params)
    },
    //user_management--批量删除
    userManageDeleteBatch: (params) => {
        return API.POST2('/login/delUserBatch', params)
    },
    //site--获取表格数据
    getSiteTable: (params) => {
        return API.POST3('/site/getPage', params)
    },
    //site--批量删除
    siteDeleteBatch: (params) => {
        return API.POST2('/site/deleteBatch', params)
    },
    //siteAdd--新增
    addSite: (params) => {
        return API.POST2('/site/addEntity', params)
    },
    //siteAdd--获取时区
    getTimeZoneList: (params) => {
        return API.POST2('/timeZone/getList', Object.assign({}, params, obj))
    },
    //siteAdd--获取终端用户列表
    getUserListBySite: (params) => {
        return API.POST2('/site/getUserList', params)
    },
    //siteAdd--根据SN判断是否是沃达丰的卡  cardType; 卡类型，1：非沃达丰，2：沃达丰
    getByWifiSNBySite: (params) => {
        return API.POST2('/wifi/getByWifiSN', params)
    },
    //siteAdd--邮编查询
    getJWDByZipCode: (params) => {
        return API.POST2('/login/getJWDByZipCode', params)
    },
    //siteAdd--校验电站名称
    checkSiteName: (params) => {
        return API.POST2('/site/getEntity', params)
    },
    //siteAdd--校验wifiIslegal唯一
    checkWifiSNByUser: (params) => {
        return API.POST2('/site/wifiIslegal', params)
    },
    //siteAdd--通过国家获取卡套餐
    getPackageByCountry: (params) => {
        return API.POST2('/vodafoneCard/queryPackageByName', params)
    },
    //siteAdd--根据用户获取wifisn
    getWifiSnByUserId: (params) => {
        return API.POST2('/wifi/getWifiSnByUserId', params)
    },
    //siteAdd--获取用户详细信息
    getUserDetails: (params) => {
        return API.POST2('/login/getUserDetails', params)
    },
    //siteAdd--根据时区获取夏令时
    getSummerTime: (params) => {
        return API.POST2('/timeZone/getSummerTime', Object.assign({}, params, obj))
    },
    //siteEdit--获取数据
    getSiteData: (params) => {
        return API.POST2('/site/getById', params)
    },
    //siteEdit--获取数据
    editSite: (params) => {
        return API.POST3('/site/editEntity', params)
    },
    //bind_wifiSn--获取数据
    bindSiteWifiSN: (params) => {
        return API.POST2('/site/siteLinkWifiSn', params)
    },
    //set_price--获取数据
    getCurrency: (params) => {
        return API.POST2('/site/getCurrency', params)
    },
    //set_price--获取电价
    getElectricityprice: (params) => {
        return API.POST2('/site/getElectricityprice', params)
    },
    //set_price--提交电价
    setElectricityprice: (params) => {
        return API.POST2('/site/setElectricityprice', params)
    },
    //stats_scope--统计范围
    editYieldValid: (params) => {
        return API.POST2('/site/editYieldValid', params)
    },
    //stats_scope--切换状态
    setStatistics: (params) => {
        return API.POST2('/site/setStatistics', params)
    },
    //real-time-display 获取机型
    getTypeModelBySN: (params) => {
        return API.POST2('/device/getTypeModelBySN', params)
    },
    //real-time-display 获取form数据
    getInverterFromRedis: (params) => {
        return API.POST2('/device/getInverterFromRedis', params)
    },
    //real-time-display 获取pv个数
    getPVBySNAndModuleId: (params) => {
        return API.POST2('/devMoudle/getPVBySNAndModuleId', params)
    },

    //report
    getReportData: (params) => {
        return API.POST2('/export/getReportData', params)
    },
    //alarmTypeDefine 获取列表
    getPageInAlarmDefine: (params) => {
        return API.POST2('/alarmPush/getPage', params)
    },
    //alarmTypeDefine 新增
    addAlarmDefine: (params) => {
        return API.POST2('/alarmPush/addEntity', params)
    },
    //alarmTypeDefine 删除
    deleteAlarmDefine: (params) => {
        return API.POST2('/alarmPush/deleteBatch', params)
    },
    //alarmTypeDefine 验证
    checkAlarmByInvType: (params) => {
        return API.POST2('/alarmPush/checkAlarmByInvType', params)
    },
    //alarmTypeDefine 编辑
    editAlarmDefine: (params) => {
        return API.POST2('/alarmPush/editEntity', params)
    },
    //alarmTypeDefine 导入
    importAlarmDefine: (params) => {
        return API.POST3('/alarmPush/alarmImport', params)
    },
    //alarmPush 获取告警数据
    getAlarmList: (params) => {
        return API.POST2('/alarmPush/getAlarmList', params)
    },
    //alarmPush 保存告警设置
    setAlarmData: (params) => {
        return API.POST2('/alarmPush/updateAlarmInfo', params)
    },
    //inverterAlarm 逆变器告警
    getInverterAlarm: (params) => {
        return API.POST3('/alarm/getAlarmData', params)
    },
    //emailSend 邮件推送设置
    getAlarmSend: (params) => {
        return API.POST2('/alarmPush/getAlarmSend', params)
    },
    //emailSend 获取邮件推送设置
    getAlarmSend: (params) => {
        return API.POST2('/alarmPush/getAlarmSend', params)
    },
    //emailSend 修改邮件推送设置
    updateAlarmSend: (params) => {
        return API.POST2('/alarmPush/updateAlarmSend', params)
    },
    //alarmTypeAnalysis 告警类型分析
    showAlarmType: (params) => {
        return API.POST2('/alarm/showAlarmType', params)
    },
    //alarmEquipment 告警设备分析
    showAlarmEquipment: (params) => {
        return API.POST2('/alarm/showAlarmEquipment', params)
    },
    //alarmRecord 告警记录
    showAlarmRecord: (params) => {
        return API.POST2('/alarm/showAlarmRecord', params)
    },
    //installationList
    getSnGuidePage: (params) => {
        return API.POST2('/snGuide/getPage', params)
    },
    //installationList
    getAllInverterTypes: (params) => {
        return API.POST2('/snGuideStep/getAllInverterTypes', params)
    },
    //installationList
    deleteSnGuide: (params) => {
        return API.POST2('/snGuide/deleteEntity', params)
    },
    //installationList-add
    addGuide: (params) => {
        return API.POST3('/snGuide/addEntity', params)
    },
    //installationList-edit
    editGuide: (params) => {
        return API.POST3('/snGuide/updateEntity', params)
    },
    //installationList-获取主步骤
    getSnGuideStepList: (params) => {
        return API.POST2('/snGuideStep/getSnGuideStepList', params)
    },
    //installationList-新增主步骤
    addSteps: (params) => {
        return API.POST2('/snGuideStep/addEntity', params)
    },
    //installationList-获取单条主步骤
    getSubStepsById: (params) => {
        return API.POST2('/snGuideStep/editEntity', params)
    },
    //installationList-编辑主步骤
    editSteps: (params) => {
        return API.POST2('/snGuideStep/updateEntity', params)
    },
    //installationList-删除主步骤
    deleteSteps: (params) => {
        return API.POST2('/snGuideStep/deleteEntity', params)
    },
    //installationList-获取子步骤
    getSubSteps: (params) => {
        return API.POST2('/snGuideStep/getSubSteps', params)
    },
    //installationList-新增子步骤
    addSubSteps: (params) => {
        return API.POST3('/snGuideStep/saveSubStep', params)
    },
    //installationList-编辑子步骤
    editSubSteps: (params) => {
        return API.POST3('/snGuideStep/updateSubGuideStep', params)
    },
    //installationList-批量删除子步骤
    deleteSubSteps: (params) => {
        return API.POST2('/snGuideStep/deleteBatchSubSteps', params)
    },
    //延保码支付-金额列表
    getAmount: (params) => {
        return API.POST2('/orderpaypal/getAmount', params)
    },
    //延保码支付-订单列表
    getOrderpaypal: (params) => {
        return API.POST3('/orderpaypal/getPage', params)
    },
    //校验
    checkCrmQuality: (params) => {
        return API.POST2('/orderpaypal/checkCrmQuality', params)
    },
    //获取地理位置分布
    selectSiteGroupAddress: (params) => {
        return API.POST2('/site/selectSiteGroupAddress', params)
    },
    //获取逆变器map标记
    selectInvMapAddress: (params) => {
        return API.POST2('/site/getPdtSiteByInverterSn', params)
    },
    //获取电站map标记
    selectSiteMapAddress: (params) => {
        return API.POST2('/site/getById', params)
    },
    //注册
    registerUser: (params) => {
        return API.POST2('/login/registerUser', params)
    },
    //注册
    registerCheckWifi: (params) => {
        return API.POST2('/login/existWifiSn', params)
    },
    registerCheckLoginName: (params) => {
        return API.POST2('/login/existUser', params)
    },
    //新UI

    //获取电站的逆变器状态
    getInverterStatesBySiteId: (params) => {
        return API.POST2('/site/getInverterStatesBySiteId', params)
    },
    getUserAllSiteId: (params) => {
        return API.POST2('/userIndex/getUserAllSiteId', params)
    },
    getSiteInfoNew: (params) => {
        return API.POST2('/userIndex/getSiteInfo', params)
    },
    saveElectricityUser: (params) => {
        return API.POST2('/userIndex/electricyPriceIncome', params)
    },
    getSitePvs: (params) => {
        return API.POST2('/siteIndex/getSitePvs', params)
    },
    getSiteBatterys: (params) => {
        return API.POST2('/siteIndex/getSiteBatterys', params)
    },
    getServerLocation: (params) => {
        return API.POST2('/websiteLocation/getLocation', params)
    },
    //地图聚合
    getRoundSiteAddress: (params) => {
        return API.POST2('/site/getRoundSiteAddress', params)
    },
    siteCheckNmi: (params) => {
        return API.POST2('/site/checkNmi', params)
    },
    firmGetPage: (params) => {
        return API.POST2('/firm/getPage', params)
    },
    firmDeleteBatch: (params) => {
        return API.POST2('/firm/deleteBatch', params)
    },
    firmIsUnique: (params) => {
        return API.POST2('/firm/isUnique', params)
    },
    firmAddEntity: (params) => {
        return API.POST2('/firm/addEntity', params)
    },
    firmGetById: (params) => {
        return API.POST2('/firm/getById', params)
    },
    firmEditEntity: (params) => {
        return API.POST2('/firm/editEntity', params)
    },
    alarmShowAlarmCount: (params) => {
        return API.POST2('/alarm/showAlarmCount', params)
    },
    gprsGetCardInfoPage: (params) => {
        return API.POST2('/gprs/getCardInfoPage', params)
    },
    gprsDeleteGprsInfo: (params) => {
        return API.POST2('/gprs/deleteGprsInfo', params)
    },
    getDptBusinessByUserId: (params) => {
        return API.POST2('/business/getDptBusinessByUserId', params)
    },
    gprsImportCardBasicinfo: (params) => {
        return API.POST3('/gprs/importCardBasicinfo', params)
    },
    gprsGetCardInformationPage: (params) => {
        return API.POST3('/gprs/getCardInformationPage', params)
    },
    gprsGetIccidInfo: (params) => {
        return API.POST3('/gprs/getIccidInfo', params)
    },
    gprsGetHistoryData: (params) => {
        return API.POST3('/gprs/getHistoryData', params)
    },
    loginResetPwd: (params) => {
        return API.POST3('/login/resetPwd', params)
    },
    SpecialupdateGetByUserType: (params) => {
        return API.POST3('/specialupdate/getByUserType', params)
    },
    SpecialupdateGetPage: (params) => {
        return API.POST3('/specialupdate/getPage', params)
    },
    SpecialupdateSave: (params) => {
        return API.POST3('/specialupdate/save', params)
    },
    SpecialupdateDelete: (params) => {
        return API.POST3('/specialupdate/delete', params)
    },
    //Gateway页面列表展示
    devgatewayGetPage: (params) => {
        return API.POST3('/devgateway/getPage', params)
    },
    devgatewaySave: (params) => {
        return API.POST3('/devgateway/save', params)
    },
    devgatewayImportGateWayInfo: (params) => {
        return API.POST3('/devgateway/importGateWayInfo', params)
    },

    //远程升级获取升级版本列表
    devgatewayupdategetList: (params) => {
        return API.POST3('/devgatewayupdate/getList', params)
    },
    //升级
    devgatewayDownMessage: (params) => {
        return API.POST3('/devgateway/downMessage', params)
    },
    //禁用gateway
    devgatewayDeviceSwitch: (params) => {
        return API.POST3('/devgateway/deviceSwitch', params)
    },
    //重置秘钥
    devgatewayResetCipher: (params) => {
        return API.POST3('/devgateway/resetCipher', params)
    },
    //1.远程升级包查询
    devgatewayupdateGetPage: (params) => {
        return API.POST3('/devgatewayupdate/getPage', params)
    },
    //2.远程升级包上传
    devgatewayupdateUploadFile: (params) => {
        return API.POST3('/devgatewayupdate/uploadFile', params)
    },
    //3.远程升级包审核、发布、禁用
    devgatewayupdateUpdate: (params) => {
        return API.POST3('/devgatewayupdate/update', params)
    },
    //4.获取设备升级状态接口
    devgatewayGetUpdateStatus: (params) => {
        return API.POST3('/devgateway/getUpdateStatus', params)
    },
    //5.控制开关是否显示接口
    devgatewayShowSwitchButton: (params) => {
        return API.POST3('/devgateway/showSwitchButton', params)
    },
}